Skip to content

feat: remove internal processors + contracts#920

Open
brendanobra wants to merge 3 commits intomainfrom
remove-internal-processors
Open

feat: remove internal processors + contracts#920
brendanobra wants to merge 3 commits intomainfrom
remove-internal-processors

Conversation

@brendanobra
Copy link
Copy Markdown
Contributor

What

What does this PR add or remove?

Why

Why are these changes needed?

How

How do these changes achieve the goal?

Test

How has this been tested? How can a reviewer test it?

Checklist

  • I have self-reviewed this PR
  • I have added tests that prove the feature works or the fix is effective

@dhillomk dhillomk requested a review from Copilot November 5, 2025 17:08
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR renames the RippleContract::Internal enum variant to RippleContract::RippleContext to better reflect its purpose as an internal platform context for message passing between Main and Extensions. The change includes updating the documentation and moving the #[default] attribute to maintain the correct default value.

  • Renamed RippleContract::Internal to RippleContract::RippleContext with improved documentation
  • Updated all references throughout the codebase including production code, tests, and mock utilities
  • Moved the #[default] attribute to the new variant to preserve default behavior

Reviewed Changes

Copilot reviewed 8 out of 8 changed files in this pull request and generated no comments.

Show a summary per file
File Description
core/sdk/src/framework/ripple_contract.rs Renamed enum variant from Internal to RippleContext and updated documentation
core/sdk/src/utils/mock_utils.rs Updated mock utilities to use RippleContext
core/sdk/src/extn/extn_client_message.rs Updated ExtnPayloadProvider implementations and test assertions
core/sdk/src/extn/client/wait_for_service_processor.rs Updated test messages to use RippleContext
core/sdk/src/extn/client/extn_processor.rs Updated test state and assertions to use RippleContext
core/sdk/src/extn/client/extn_client.rs Updated all test cases and processor initializations to use RippleContext
core/main/src/service/ripple_service/service_controller_state.rs Updated error message handling to use RippleContext
core/main/src/firebolt/firebolt_ws.rs Updated error message handling to use RippleContext

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

payload: ExtnPayload::Response(ExtnResponse::Error(e)),
requestor: ExtnId::try_from(session.get_app_id()).unwrap(),
target: RippleContract::Internal,
target: RippleContract::RippleContext,
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should not be sending any ExtnMessage here. Instead use service message for propagating this error as JSON RPC error response.

id: "test_id".to_string(),
requestor: ExtnId::get_main_target("main".into()),
target: RippleContract::Internal,
target: RippleContract::RippleContext,
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The scope of this ticket is to eliminate the use of RippleContract::Internal and switch to direct function calls or rule-based invocation. These tests are no longer relevant since we are removing the use of ExtnMessages.

@github-actions
Copy link
Copy Markdown

github-actions bot commented Nov 7, 2025

Code Coverage

Package Line Rate Health
core.sdk.src.api.device 76%
core.sdk.src.api.firebolt 85%
core.sdk.src.api.observability 57%
core.sdk.src.extn.ffi 0%
core.sdk.src.utils 63%
core.main.src.broker.rules 78%
core.main.src.processor.storage 0%
device.thunder_ripple_sdk.src.processors.events 0%
core.sdk.src.manifest 0%
core.main.src.firebolt.handlers 11%
core.main.src.broker.test 90%
core.main.src.processor 0%
core.main.src.service.apps 25%
core.main.src.service.ripple_service 9%
core.sdk.src.api 45%
core.main.src.firebolt 12%
core.sdk.src.api.distributor 29%
core.sdk.src.service.mock_app_gw 0%
device.thunder_ripple_sdk.src.processors 19%
core.sdk.src.framework 64%
core.main.src.service 32%
device.thunder_ripple_sdk.src 13%
core.main.src.service.extn 25%
core.main.src.state.cap 42%
core.sdk.src.extn.client 82%
device.thunder_ripple_sdk.src.client 61%
core.sdk.src.processor 6%
core.tdk.src.utils 0%
device.thunder_ripple_sdk.src.events 4%
core.main.src.bootstrap.extn 0%
core.main.src.utils 30%
core.tdk.src.gateway 100%
device.mock_device.src 55%
core.main.src.broker 69%
core.sdk.src.api.manifest 74%
core.sdk.src.service 42%
core.main.src 0%
core.sdk.src.extn 76%
core.main.src.broker.thunder 37%
core.main.src.state 35%
core.sdk.src.service.mock_app_gw.appgw 0%
core.main.src.bootstrap.manifest 0%
device.thunder_ripple_sdk.src.bootstrap 0%
core.sdk.src.api.gateway 69%
core.main.src.bootstrap 0%
Summary 49% (21114 / 43499)

Minimum allowed line rate is 48%

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants